<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">
	<meta charset="UTF-8">
	<title>添加库存信息</title>
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="stylesheet" type="text/css" href="admin/common/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="admin/common/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="admin/common/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="admin/css/personal.css" media="all">
	<script type="text/javascript" src="admin/js/jquery-1.7.2.min.js"></script>
</head>
<body class="childrenBody">
	<form class="layui-form" action="${pageContext.request.contextPath}/inventoryinfoAction!save" method="post" enctype="multipart/form-data">
		  <div class="layui-form-item">
			<div class="layui-inline">		
				<label class="layui-form-label">配件类型</label>
				<div class="layui-input-inline">
					<select class="pTITypeName" name="partstypeinfo.ptiid">
				    </select>
				</div>
			</div>
			<div class="layui-inline">		
				<label class="layui-form-label">使用汽车类型</label>
				<div class="layui-input-inline">
					<select class="cardtypeinfoName" name="cardtypeinfo.ctiid">
				    </select>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">配件名称</label>
			<div class="layui-input-block">
				<input id="inpName" class="layui-input newsName iTIName" name="inventoryinfo.itiname" lay-verify="required" placeholder="请输入配件姓名" type="text">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">	
				<label class="layui-form-label">进价</label>
				<div class="layui-input-block">
					<input class="layui-input iTIPrice" lay-verify="number" name="inventoryinfo.itiprice" placeholder="请输入进价" type="text">
				</div>	
			</div>
			<div class="layui-inline">	
				<label class="layui-form-label">售价</label>
				<div class="layui-input-block">
					<input class="layui-input iTISelling" lay-verify="number" name="inventoryinfo.itiselling" placeholder="请输入售价" type="text">
				</div>	
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">图片</label>
				<div class="layui-input-block">
					<input class="layui-input iTIPicture" lay-verify="required" name="upload"  type="file">
				</div>	
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">	
				<label class="layui-form-label">型号参数</label>
				<div class="layui-input-block">
					<input class="layui-input iTIParameter" lay-verify="required" name="inventoryinfo.itiparameter" placeholder="请输入型号参数" type="text">
				</div>	
			</div>
			<div class="layui-inline">	
				<label class="layui-form-label">库存</label>
				<div class="layui-input-block">
					<input class="layui-input iTICount" lay-verify="number" name="inventoryinfo.iticount" placeholder="请输入库存" type="text">
				</div>	
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">作用</label>
			<div class="layui-input-block">
				<input class="layui-input iTIEffect" lay-verify="required" name="inventoryinfo.itieffect" placeholder="请输入作用" type="text">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<input type="submit" class="layui-btn inventoryinfoBut" lay-submit="" lay-filter="addNews" value="立即提交" />
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
		    </div>
		</div>
	</form>
	<script type="text/javascript" src="admin/common/layui/layui.js"></script>
	<script type="text/javascript" src="admin/js/inventoryinfo.js"></script>
	<script type="text/javascript" src="admin/js/addinventoryinfo.js"></script>
	
	<script type="text/javascript">
	layui.use(['form','element','jquery','layer'], function(){
			var $=layui.jquery,form=layui.form;
			$(".inventoryinfoBut").click(function(){
				var ctitype=$(".cardtypeinfoName option:checked").val();
				var pTITypeName=$(".pTITypeName option:checked").val();
				var iTIName=$(".iTIName").val();
				var iTIPrice=$(".iTIPrice").val();
				var iTISelling=$(".iTISelling").val();
				var iTIPicture=$(".iTIPicture").val();
				var iTIParameter=$(".iTIParameter").val();
				var iTIEffect=$(".iTIEffect").val();
				var iTICount=$(".iTICount").val();
				if(iTIName=="" || iTIPrice=="" || iTISelling=="" || iTIPicture=="" || iTIParameter=="" || iTIEffect=="" || iTICount==""){
					return;
				}
		})
	})
	</script>

</body>
</html>